//	--------------------------------------------------------------------
//	Copyright(C) 2006,2007 Zhao Yukun. All rights reserved.
//	This file is a part of the Xeres system.
//	Xeres 2007
//	Contact : xeres.engine@gmail.com
//	$(reservedInfo)
//	$(reservedDeclaration)
//	--------------------------------------------------------------------
///	@file	<time_control.cpp>
///	@path	~/src/engine/xcore
///	@date	2008/03/23
///	@desc	.

#include "config/config.h"

#include "engine/xcore/time_control.h"

namespace xeres {


	// TimeControl
	TimeControl::TimeControl( void )
		: m_birth()
		, m_start()
	{

	}
	// ~TimeControl
	TimeControl::~TimeControl( void )
	{

	}
	// UpdateTime
	void TimeControl::UpdateTime( void )
	{
		m_global = rough();
	}
	// rough
	float TimeControl::rough( void )
	{
		return (Time::Now() - m_birth).ToMilliSecond() / 1000.f;
	}
	// accurate
	float TimeControl::accurate( void )
	{
		return (Counter::Now() - m_start).ToTime().ToMilliSecond() / 1000.f;
	}

} // namespace xeres
